# coding:utf-8
# just test git
import os, sys
from Tkinter import *

root = Tk()
root.title("登陆QQ号")
Label(root,text='账号:').grid(row=0)
Label(root,text='密码:').grid(row=1)
v1 = StringVar()
v2 = StringVar()
e1 = Entry(root,textvariable=v1)
e2 = Entry(root,textvariable=v2,show="*")
e1.grid(row=0,column=1,padx=10,pady=5)
e2.grid(row=1,column=1,padx=10,pady=5)

 
def login():
    his_qq()
    root.quit()
    print "账号:%s" % v1.get()
    print "密码:%s" % v2.get()
    e1.delete(0,END)
    e2.delete(0,END)

def his_qq():
    root2 = Tk()
    root2.title("想要爬取的qq号")
    Label(root2, text='账号:').grid(row=0)
    v21 = StringVar()
    e1 = Entry(root2, textvariable=v21)
    e1.grid(row=0, column=1, padx=10, pady=5)
    theButton = Button(root2, text=" 确认", width=10, command=root2.quit())
    theButton.grid(row=3, column=0, sticky=E, padx=10, pady=5)
    root2.mainloop()






button1 = Button(root,text="登陆",width = 10,command =login)
button1.grid(row=3,column=0,sticky=W,padx=10,pady=5)
button2 = Button(root,text=" 取消",width = 10,command = root.quit)
button2.grid(row=3,column=1,sticky=E,padx=10,pady=5)


root.mainloop()



